<?php

namespace app\common\validate;

use think\Validate;

class JoinApplication extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'ind_name' => 'require',
        'ind_id_no' => 'require',
        'ind_id_front_image' => 'require',
        'ind_id_rear_image' => 'require',
        'ind_tel' => 'require',
        'ind_bank_account' => 'require',
        'ind_bank_tel' => 'require',
        'biz_category' => 'require',
        'ent_name' => 'require',
        'ent_addr' => 'require',
        'ent_repr_name' => 'require',
        'ent_repr_id_no' => 'require',
        'ent_repr_id_front_image' => 'require',
        'ent_repr_id_rear_image' => 'require',
        'ent_repr_tel' => 'require',
        'biz_license_image' => 'require',
        'ent_bank_account' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'ind_name.require' => '姓名不能为空',
        'ind_id_no.require' => '身份证号不能为空',
        'ind_id_front_image.require' => '请上传手持身份证照(正面)',
        'ind_id_rear_image.require' => '请上传手持身份证照(背面)',
        'ind_tel.require' => '联系电话不能为空',
        'ind_bank_account.require' => '银行卡账户不能为空',
        'ind_bank_tel.require' => '银行预留手机号码不能为空',
        'biz_category.require' => '主营类目不能为空',
        'ent_name.require' => '公司名称不能为空',
        'ent_addr.require' => '公司地址不能为空',
        'ent_repr_name.require' => '法人姓名不能为空',
        'ent_repr_id_no.require' => '法人身份证号不能为空',
        'ent_repr_id_front_image.require' => '请上传法人手持身份证照(正面)',
        'ent_repr_id_rear_image.require' => '请上传法人手持身份证照(背面)',
        'ent_repr_tel.require' => '法人电话不能为空',
        'biz_license_image.require' => '营业执照不能为空',
        'ent_bank_account.require' => '对公账户不能为空',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'individual' => [
            'ind_name',
            'ind_id_no',
            'ind_id_front_image',
            'ind_id_rear_image',
            'ind_tel',
            'ind_bank_account',
            'ind_bank_tel',
            'biz_category',
        ],
        'enterprise' => [
            'ent_name',
            'ent_addr',
            'biz_category',
            'ent_repr_name',
            'ent_repr_id_no',
            'ent_repr_id_front_image',
            'ent_repr_id_rear_image',
            'ent_repr_tel',
            'biz_license_image',
            'ent_bank_account',
        ],
    ];

}
